package com.hukun.agent;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyInvocationHandler  implements InvocationHandler {



    private Object obj;
    public MyInvocationHandler(Object o)
    {
        this.obj =o;
    }

    public void  find(String  obj)
    {
        System.out.println("中介找"+obj);
    }

    public void  sign(String  obj)
    {
        System.out.println("中介签约"+obj);
    }
    @Override
    public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
        find((String)objects[0]);
        sign((String)objects[0]);
        Object invoke = method.invoke(obj, objects);
        return invoke;
    }
}
